package com.x.rocketmq.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = false)
public class RMQClientException extends RuntimeException {

  private static final long serialVersionUID = -5758410930844185841L;
  private String responseCode;
  private String errorMessage;

  public RMQClientException(String errorMessage, Throwable cause) {
    super(errorMessage, cause);
    this.errorMessage = errorMessage;
  }

  public RMQClientException(String responseCode, String errorMessage) {
    super(errorMessage);
    this.responseCode = responseCode;
    this.errorMessage = errorMessage;
  }
}
